<script src="js/admin/menu.js"></script>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
    <legend>菜单管理</legend>
</fieldset>
<div id="menuTree" style=" margin-top: 15px;"></div>
<div id="popLayer" style="display: none;">
    <div id="menuDiv" class="popLayer" style="display: none;">
        <form id="menuForm" class="layui-form" lay-filter="menuForm" style="width: 510px;margin-top: 30px;">
            <input id="menuHsmId" type="hidden" name="hsmId">
            <input id="menuParentId" type="hidden" name="parentId">
            <div class="layui-form-item">
                <label class="layui-form-label">菜单路径</label>
                <div class="layui-input-block">
                    <input type="text" name="url" required lay-verify="required" placeholder="示例：admin/menu.html"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">菜单名称</label>
                    <div class="layui-input-inline" style="width: 130px;">
                        <input type="text" name="hsmName" required lay-verify="required" placeholder="请输入菜单名称"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">子节点</label>
                    <div class="layui-input-inline" style="width: 80px;">
                        <input type="checkbox" name="isChild" lay-skin="switch" lay-text="是|否" checked value="1">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">菜单类型</label>
                    <div class="layui-input-inline" style="width: 130px;">
                        <select name="hsmType" lay-verify="required">
                            <option value=""></option>
                            <option value="1">内部</option>
                            <option value="2">外链</option>
                            <option value="3">功能</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">是否启用</label>
                    <div class="layui-input-inline" style="width: 80px;">
                        <input type="checkbox" name="state" lay-skin="switch" lay-text="是|否" checked value="1">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">菜单图标</label>
                    <div class="layui-input-inline" style="width: 130px;">
                        <input type="text" name="icon" placeholder="请输入菜单图标"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">排序号</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="sortNum" required lay-verify="required|number" placeholder="请输入排序号"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="text-align: right">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="menuSave">确认</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>